#!/bin/bash
# Zaitan Module - Lazarus Install
# Zaitan Team <http://code.google.com/p/zaitan/>


RMOD_ENGINE='1.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Developed'
RMOD_NAME='Lazarus'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='0.9.22'
RMOD_DESCRIPTION='Installs Audacious'
RMOD_UPDATE_URL='http://code.google.com/p/zaitan/'s


# Install Lazarus

echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall


apt-get -y install libgdk-pixbuf2
apt-get -y install xspecs
apt-get -y install libglib1.2-dev
apt-get -y install libgtk1.2-doc
apt-get -y install libglib1.2
apt-get -y install libgdk-pixbuf-dev 


cd /usr/share/zaitan
mkdir LAZARUS

cd LAZARUS
wget -c http://ufpr.dl.sourceforge.net/sourceforge/lazarus/fp_all_deb.tar
tar -xvvf fp_all_deb.tar

cd deb
dpkg -i fp-units-rtl_2.0.4-1_i386.deb 
dpkg -i fp-units-base_2.0.4-1_i386.deb
dpkg -i fp-units-fcl_2.0.4-1_i386.deb
dpkg -i fp-units-gtk_2.0.4-1_i386.deb  	
dpkg -i fp-units-gtk2_2.0.4-1_i386.deb 
dpkg -i fp-units-gnome1_2.0.4-1_i386.deb
dpkg -i fp-units-misc_2.0.4-1_i386.deb
dpkg -i fp-units-db_2.0.4-1_i386.deb
dpkg -i fp-units-fv_2.0.4-1_i386.deb
dpkg -i fp-units-gfx_2.0.4-1_i386.deb
dpkg -i fp-ide_2.0.4-1_i386.deb
dpkg -i fp-compiler_2.0.4-1_i386.deb
dpkg -i fpc-src_2.0.4-1_i386.deb
dpkg -i fpc-crosswin32_2.0.4-060919_i386.deb
dpkg -i fp-units-net_2.0.4-1_i386.deb  
dpkg -i fp-utils_2.0.4-1_i386.deb

## Lazarus
wget -c http://ufpr.dl.sourceforge.net/sourceforge/lazarus/lazarus_0.9.22-1_i386.deb
dpkg -i lazarus_0.9.22-1_i386.deb

apt-get -f install
ln -s /usr/share/lazarus/lazarus /usr/local/bin/lazarus

echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##
exit 0
